//
//  Aria2ProxyApp.swift
//  Aria2Proxy
//
//  Created by 张宇飞 on 2024/11/4.
//

import SwiftData
import SwiftUI

@main
struct Aria2ProxyApp: App {
    @Environment(\.scenePhase) private var scenePhase

    var body: some Scene {
        WindowGroup {
            ContentView()
                .frame(minWidth: 600)
        }
        .onChange(of: scenePhase) {
            if self.scenePhase == .background {
                exit(0)
            }
        }
        .windowResizability(.contentSize)
    }
}
